this.emit('selected-date-changed', new Date(this._selectedDate));
},
+ updateTimeZone: function() {
+ // The calendar need to be rebuilt after a time zone update because
+ // the date might have changed.
+ this._rebuildCalendar();
+ this._update();
+ },
+
_buildHeader: function() {
let layout = this.actor.layout_manager;
let offsetCols = this._useWeekdate ? 1 : 0;
const PopupMenu = imports.ui.popupMenu;
const Calendar = imports.ui.calendar;
const Weather = imports.misc.weather;
+const System = imports.system;
function _isToday(date) {
let now = new Date();
this._clock = new GnomeDesktop.WallClock();
this._clock.bind_property('clock', this._clockDisplay, 'text', GObject.BindingFlags.SYNC_CREATE);
+ this._clock.connect('notify::timezone', Lang.bind(this, this._updateTimeZone));
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._sessionUpdated();
this._eventSource = eventSource;
},
+ _updateTimeZone: function() {
+ // SpiderMonkey caches the time zone so we must explicitly clear it
+ // before we can update the calendar, see
+ // https://bugzilla.gnome.org/show_bug.cgi?id=678507
+ System.clearDateCaches();
+
+ this._calendar.updateTimeZone();
+ },
+
_sessionUpdated: function() {
let eventSource;
let showEvents = Main.sessionMode.showCalendarEvents;